<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    template="layout/template.xhtml">

<ui:define name="body">

    <rich:panel>
        <f:facet name="header">Suggestioninfo Details</f:facet>


        <s:decorate id="createDate" template="layout/display.xhtml">
            <ui:define name="label">Create date</ui:define>
            <h:outputText value="#{suggestioninfoHome.instance.createDate}">
                <s:convertDateTime type="both" dateStyle="short"/>
            </h:outputText>
        </s:decorate>

        <s:decorate id="infoMsg" template="layout/display.xhtml">
            <ui:define name="label">Info msg</ui:define>
            <h:outputText value="#{suggestioninfoHome.instance.infoMsg}"/>
        </s:decorate>

        <s:decorate id="quality" template="layout/display.xhtml">
            <ui:define name="label">Quality</ui:define>
            <h:outputText value="#{suggestioninfoHome.instance.quality}"/>
        </s:decorate>

        <s:decorate id="lastCommentDate" template="layout/display.xhtml">
            <ui:define name="label">Last comment date</ui:define>
            <h:outputText value="#{suggestioninfoHome.instance.lastCommentDate}">
                <s:convertDateTime type="both" dateStyle="short"/>
            </h:outputText>
        </s:decorate>

        <div style="clear:both"/>

    </rich:panel>

    <div class="actionButtons">

        <s:button view="/SuggestioninfoEdit.xhtml"
                    id="edit"
                 value="Edit"/>

        <s:button view="/#{empty suggestioninfoFrom ? 'SuggestioninfoList' : suggestioninfoFrom}.xhtml"
                    id="done"
                 value="Done"/>

    </div>

    <rich:tabPanel switchType="ajax">

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/onetomany.gif" style="vertical-align: middle; padding-right: 4px;"/>Commentonsuggestions</h:panelGroup>
        </f:facet>
    <h:form styleClass="association" id="commentonsuggestionsChildren">

        <h:outputText value="There are no commentonsuggestions associated with this suggestioninfo."
                   rendered="#{empty suggestioninfoHome.commentonsuggestions}"/>

        <rich:dataTable value="#{suggestioninfoHome.commentonsuggestions}"
                       var="_commentonsuggestion"
                  rendered="#{not empty suggestioninfoHome.commentonsuggestions}"
                rowClasses="rvgRowOne,rvgRowTwo"
                        id="commentonsuggestionsTable">
            <rich:column sortBy="#{_commentonsuggestion.idCommentOnSuggestion}">
                <f:facet name="header">Id comment on suggestion</f:facet>
                <h:outputText value="#{_commentonsuggestion.idCommentOnSuggestion}"/>
            </rich:column>
            <rich:column sortBy="#{_commentonsuggestion.msg}">
                <f:facet name="header">Msg</f:facet>
                <h:outputText value="#{_commentonsuggestion.msg}"/>
            </rich:column>
            <rich:column sortBy="#{_commentonsuggestion.createDate}">
                <f:facet name="header">Create date</f:facet>
                <h:outputText value="#{_commentonsuggestion.createDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <h:column>
                <f:facet name="header">Action</f:facet>
                <s:link id="selectcommentonsuggestion"
                     value="Select"
                      view="/Commentonsuggestion.xhtml">
                    <f:param name="commentonsuggestionIdCommentOnSuggestion"
                            value="#{_commentonsuggestion.idCommentOnSuggestion}"/>
                    <f:param name="commentonsuggestionFrom" value="Suggestioninfo"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </h:form>

    <div class="actionButtons">
        <s:button
               value="Add commentonsuggestion"
                view="/CommentonsuggestionEdit.xhtml">
            <f:param name="suggestioninfoIdSuggestionInfo"
                    value="#{suggestioninfoHome.instance.idSuggestionInfo}"/>
            <f:param name="commentonsuggestionFrom" value="Suggestioninfo"/>
        </s:button>
    </div>
    </rich:tab>

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/onetomany.gif" style="vertical-align: middle; padding-right: 4px;"/>Suggestions</h:panelGroup>
        </f:facet>
    <h:form styleClass="association" id="suggestionsChildren">

        <h:outputText value="There are no suggestions associated with this suggestioninfo."
                   rendered="#{empty suggestioninfoHome.suggestions}"/>

        <rich:dataTable value="#{suggestioninfoHome.suggestions}"
                       var="_suggestion"
                  rendered="#{not empty suggestioninfoHome.suggestions}"
                rowClasses="rvgRowOne,rvgRowTwo"
                        id="suggestionsTable">
            <rich:column sortBy="#{_suggestion.idSuggestion}">
                <f:facet name="header">Id suggestion</f:facet>
                <h:outputText value="#{_suggestion.idSuggestion}"/>
            </rich:column>
            <rich:column sortBy="#{_suggestion.createDate}">
                <f:facet name="header">Create date</f:facet>
                <h:outputText value="#{_suggestion.createDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_suggestion.rejectDate}">
                <f:facet name="header">Reject date</f:facet>
                <h:outputText value="#{_suggestion.rejectDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_suggestion.seenDate}">
                <f:facet name="header">Seen date</f:facet>
                <h:outputText value="#{_suggestion.seenDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <h:column>
                <f:facet name="header">Action</f:facet>
                <s:link id="selectsuggestion"
                     value="Select"
                      view="/Suggestion.xhtml">
                    <f:param name="suggestionIdSuggestion"
                            value="#{_suggestion.idSuggestion}"/>
                    <f:param name="suggestionFrom" value="Suggestioninfo"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </h:form>

    <div class="actionButtons">
        <s:button
               value="Add suggestion"
                view="/SuggestionEdit.xhtml">
            <f:param name="suggestioninfoIdSuggestionInfo"
                    value="#{suggestioninfoHome.instance.idSuggestionInfo}"/>
            <f:param name="suggestionFrom" value="Suggestioninfo"/>
        </s:button>
    </div>
    </rich:tab>
</rich:tabPanel>
</ui:define>

</ui:composition>
